<?php
/**
 * sitechannel.php
 * Created on 2015-03-25 09:52:19
 * Create by yuebin
 */
namespace haibao\cms\model\data\site;

class SiteChannel extends \haibao\cms\model\data\Base {
	
	const STATUS_ENABLE = 1;
	const STATUS_DIS_ENABLE = 0;
	/**
	 * 站点ID
	 */
	public $SiteId;
	/**
	 * 父ID
	 */
	public $ParentId;
	/**
	 * 频道名字
	 */
	public $ChannelName;
	/**
	 * 频道Url
	 */
	public $ChannelUrl;
	/**
	 * 频道状态
	 */
	public $Status = 1;
	/**
	 * 排序号
	 */
	public $OrderNo = 0;
	/**
	 * 频道关联标签
	 */
	public $SiteChannelTag = array();
	/**
	 * 频道模版
	 */
	public $SiteChannelTemplate;
	
	/**
	 * 频道编码
	 */
	public $ChannelCode;
	public function __construct() {
		parent::__construct();
		$this->intField ( 'SiteId', 'SiteId', true );
		$this->intField ( 'ParentId', 'ParentId', true );
		$this->stringField ( 'ChannelName', 'ChannelName', true );
		$this->stringField ( 'ChannelUrl', 'ChannelUrl', true );
		$this->stringField ( 'ChannelCode', 'ChannelCode');
		$this->intField ( 'Status', 'Status');
		$this->intField ('OrderNo','OrderNo');
		
		$this->relationManyField('SiteChannelTag', '\haibao\cms\model\data\site\SiteChannelTag', 'ChannelId');
		$this->setTableName ( 'SiteChannel' );
	}
}